
	<meta charset="utf-8">
	<script type="text/javascript" src="<?=base_url();?>java_scripts/vote_scripts.js"></script>
	<link rel="stylesheet" href="<?=base_url();?>themes/base/jquery.ui.all.css">
	<script src="<?=base_url();?>ui/jquery-1.5.1.js"></script>
	<script src="<?=base_url();?>ui/jquery.ui.core.js"></script>
	<script src="<?=base_url();?>ui/jquery.ui.widget.js"></script>
	<script src="<?=base_url();?>ui/jquery.ui.datepicker.js"></script>
	<link type="text/css" href="<?=base_url();?>css/demos.css" rel="stylesheet" />
	<script>
	$(function() {
		$( "#datepicker1" ).datepicker();
	});
	$(function() {
		$( "#datepicker2" ).datepicker();
	});
	</script>

<?php 
	$top_id=(!isset($top_id))?"":$top_id;
	$start_date=(!isset($start_date))?"":$start_date;
	$end_date=(!isset($end_date))?"":$end_date;
	$error_msg=(!isset($error))?"":$error;
?>
	<h3 class="capture">Vote Management</h3>
    <div id="wrap">
    
    <div id="tdd_selected">
    	<div class="dd_selected">Add New - Voting Items</div>
        <div class="dd_view">

	      	<form action="" method="post">
	      		<table border="0" cellpadding="0" cellspacing="0" width="60%" align="center">
	      			<tr align="center">
	      				<td height="55" align="right">Vote Topic :&nbsp;&nbsp;&nbsp;</td>
	      				<td align="left">
	      					<select name="txttopic" id="txttopic">
	      						<?php 
	      							foreach ($topics->result_array() as $topic) {
	      								$selectMe=($top_id==$topic['top_id'])?"selected":"";
	      						?>
	      						<option <?=$selectMe?> value="<?=$topic['top_id']?>"><?=$topic['top_name']?></option>
	      						<?php 
	      							}
	      						?>
	      					</select>
	      				</td>
	      			</tr>
	      			<tr>
	      				<td height="55" align="right">Start Date :&nbsp;&nbsp;&nbsp;</td>
	      				<td><div style="width: 300px;"><input type="text" value="<?=$start_date?>" name="startdate" id="datepicker1"></div></td>
	      			</tr>
	      			<tr>
	      				<td height="55" align="right">End Date :&nbsp;&nbsp;&nbsp;</td>
	      				<td><div style="width: 300px;"><input type="text" value="<?=$end_date?>" name="enddate" id="datepicker2"></div></td>
	      			</tr>
	      			<tr>
	      				<td height="10" align="right"></td>
	      				<td><?=$error_msg?></td>
	      			</tr>
	     
	      			<tr align="center">
	      				<td>&nbsp;</td>
	      				<td height="20" colspan="2" align="left"><br/><input type="button" class="button_back_end" onclick="javascript:window.location='<?=site_url("vote_management/voteEvent")?>'" style="cursor: pointer; width:50px;" value="Back"/>&nbsp;&nbsp;<input type="button" class="button_back_end" onclick="javascript:addEvent('<?=site_url("vote_management/addEvent")?>')" style="cursor: pointer; width:50px;" value="Add"/></td>
	      			</tr>

	      		</table>
	      	</form>
</div></div>
</div>
